<template>
  <div>
    <iframe :src="iframeUrl" scrolling="no" width="100%" :height="iframeHeight" frameborder="0" />
  </div>
</template>
<script>

export default {
  name: 'InteriorVerify',
  inject: ['workDetail'],
  data() {
    return {
      iframeHeight: 190
    }
  },
  computed: {
    iframeUrl() {
      return `${process.env.VUE_APP_ZHONGRUAN_URL}interiorVerify?prjId=${this.prjId}&settPageType=${this.settPageType}`
    }
  },
  async created() {
    window.addEventListener('message', (event) => {
      const base_url = ''
      if (event.origin === base_url) {
        return
      }
      if (event.data.type === 'interiorVerify') {
        this.iframeHeight = event.data.height
      }
    })
  }
}
</script>
<style scoped lang='scss'>
</style>
